package xyz.iguilty.documents.starter;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import xyz.iguilty.documents.excel.view.ExcelTemplateViewResolver;

@Configuration
@EnableConfigurationProperties(ExcelProperties.class)//使ConfigurationProperties生效
public class ExcelAutoConfiguration {
    @Bean
    public ExcelTemplateViewResolver excelTemplateViewResolver(ExcelProperties excelProperties){
        ExcelTemplateViewResolver resolver = new ExcelTemplateViewResolver(excelProperties);
//        2147483642 FreemarkerResolver
//        2147483642 ThymeleafViewResolver
//        2147483647 jsp
        resolver.setOrder(1992030701);
        return resolver;
    }
}
